package calculatorModel;

import java.util.Observable;

import calculatorView.CalculatorArea;

public class Operation extends Observable implements IOperation, IVerifySeq {

	private IOperation operator;
	private int[] results;

	public Operation() {
		super();
	}

	public Operation(IOperation operator) {
		super();
		this.operator = operator;
	}

	public IOperation getOperator() {
		return operator;
	}

	public void setOperator(IOperation operator) {
		this.operator = operator;
	}

	private void imChanging() {
		setChanged();
		notifyObservers();
	}

	public int[] getResults() {
		return results;
	}

	public void setResults(int[] results) {
		this.results = results;
		imChanging();

	}

	@Override
	public int[] doIntOperation(int[] element) {
		return results;

	}

	// NB: i metodi di seguito sono altamente instabili, per questo ho astratto
	// con l'interfaccia IVerifySeq
//TODO
	@Override
	public int verify(CalculatorArea area) {
		return 0;
	}

}
